/*    */ package handling.login.handler;
/*    */ 
/*    */ import client.MapleCharacterUtil;
/*    */ import client.MapleClient;
/*    */ import tools.MaplePacketCreator;
/*    */ import tools.Pair;
/*    */ import tools.data.input.LittleEndianAccessor;
/*    */ import tools.packet.LoginPacket;
/*    */ import tools.packet.UIPacket;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class ShowAccCash
/*    */ {
/*    */   public static void handlePacket(LittleEndianAccessor slea, MapleClient c) {
/* 21 */     int accId = slea.readInt();
/* 22 */     if (c.getAccID() == accId) {
/* 23 */       if (c.getPlayer() != null) {
/* 24 */         c.announce(MaplePacketCreator.showPlayerCash(c.getPlayer()));
/*    */       } else {
/* 26 */         Pair<Integer, Integer> cashInfo = MapleCharacterUtil.getCashByAccId(accId);
/* 27 */         if (cashInfo == null) {
/* 28 */           c.announce(MaplePacketCreator.enableActions());
/*    */           return;
/*    */         } 
/* 31 */         c.announce(LoginPacket.ShowAccCash(((Integer)cashInfo.getLeft()).intValue(), ((Integer)cashInfo.getRight()).intValue()));
/*    */       } 
/* 33 */       c.announce(UIPacket.ExpandPropBar());
/*    */     } 
/*    */   }
/*    */ }


/* Location:              C:\PGX\Server.jar!\handling\login\handler\ShowAccCash.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */